//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package objects;

import java.util.LinkedHashMap;

public class ExpLevels {
    private static final LinkedHashMap<Integer, ExpLevelsEntry> levels = new LinkedHashMap();

    public ExpLevels() {
    }

    public static void add(ExpLevelsEntry ele) {
        if(ele.getLevel() != null) {
            levels.put(ele.getLevel(), ele);
        }

    }

    public static Integer getExpToNextLevel(int level) {
        ExpLevelsEntry e = (ExpLevelsEntry)levels.get(Integer.valueOf(level));
        return e != null?e.getExpToNextLevel():null;
    }

    public static Integer getMaxFields(int level) {
        ExpLevelsEntry e = (ExpLevelsEntry)levels.get(Integer.valueOf(level));
        return e != null?e.getMaxFields():((ExpLevelsEntry)levels.get(Integer.valueOf(levels.size() - 1))).getMaxFields();
    }

    public static ExpLevelsEntry get(int level) {
        return (ExpLevelsEntry)levels.get(Integer.valueOf(level));
    }
}
